#ifndef EDITBAR_H_INCLUDED
#define EDITBAR_H_INCLUDED

#include "SDL/SDL.h"
#include "SDL/SDL_gfxPrimitives.h"
#include <string>

#include "helpers.h"
#include "Image.h"
#include "Object.h"

using namespace std;

enum Mode{TERRAIN, BG_DECORATION, FG_DECORATION};
enum Tool{PENCIL, ERASER, BRUSH, ROTATION};
enum Field{NAME, LOAD, THEME, XSIZE, YSIZE};

class EditBar
{
    public:

        bool typing;
        bool expanded;

        int bank_select;
        unsigned int bank_scrolled;

        Mode mode;
        Tool tool;
        Field field;

        TTF_Font *font;
        SDL_Color textColor;

        std::vector<std::string> objectFiles;
        std::vector<Object*> objectBank;

        string inputBuffer;
        string mapname;
        string themeString;
        Image title;
        Image theme;
        Image size_w;
        Image size_h;

        Image save;
        Image left_arrow;
        Image right_arrow;
        Image pencil;
        Image eraser;
        Image brush;
        Image rotation;
        Image highlight;

        SDL_Rect* bounds;

        EditBar(Artist& artist);
        void show(SDL_Surface*, string, string);
        void cycle(Direction);
};

#endif // EDITBAR_H_INCLUDED
